package com.example.communist_app_api.service.impl;

import com.example.communist_app_api.db.dao.ActionDao;
import com.example.communist_app_api.db.pojoDto.Action;
import com.example.communist_app_api.service.ActionService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

/**
 * @author love~mlm
 * @version 1.0
 * Create by 2022/11/19 19:56
 */
@Transactional
@Service
public class ActionServiceImpl implements ActionService {

    @Autowired
    private ActionDao actionDao;

    @Override
    public String getActionCodeByActionId(Integer actionId) {
        return actionDao.getActionCodeByActionId(actionId);
    }

    public Action getActionByActionName(String actionCode) {
        return actionDao.getActionByActionName(actionCode);
    }
}
